package com.timber.util;

import java.awt.*;
import javax.swing.*;
import pv.jfcx.JPVButton;


public class SLImageButton extends JPVButton
{

  public SLImageButton()
  {
    setLAF( false );
    setBackground(null);
    setForeground(Color.black);
    setThreeButtonStates(true);
    setFocusRect(false);
    setImageAlignment(pv.jfcx.JPVButton.TOP);
    setTextAlignment(2);
    setImageEdge(4);
    setMaximumSize(new Dimension(50, 50));
    setPreferredSize(new Dimension(50, 50));
    setText("");
  }

  public SLImageButton( String label )
  {
    this();

    setText( label );
  }

  public SLImageButton( String label, int iconId )
  {
    this(label);

    setImageAt( ImageMgr.getIcon( iconId ).getImage(), 0 );
  }

  public SLImageButton( String label, int iconId, int width, int height )
  {
    this(label, iconId);

    setMinimumSize(new Dimension(width, height));
    setMaximumSize(new Dimension(width, height));
    setPreferredSize(new Dimension(width, height));
  }


}
